package com.example.demo.config;

import com.example.demo.service.MedalService;
import com.example.demo.serviceImpl.GuardMedalServiceImpl;
import com.example.demo.serviceImpl.GuestMedalServiceImpl;
import com.example.demo.serviceImpl.VipMedalServiceImpl;

import java.util.HashMap;
import java.util.Map;

/**
 * @author LiYuhang
 * @version 0.1
 * @application 勋章服务工产类
 * @Copyright 上海危网信息科技有限公司版权所有
 * @company wwsoft
 * @Date 2020/4/21 9:23
 */
public class MedalServicesFactory {

    private  static  final Map< String  , MedalService> map  =   new HashMap<>();

    static{
        map.put("guard",new GuardMedalServiceImpl());
        map.put("guest",new GuestMedalServiceImpl());
        map.put("vip",new VipMedalServiceImpl());
    }

    public static MedalService getMedalSericeByType(String medalType){
        return map.get(medalType);
    }
}
